<?php

$strScreenName = 'EnterProductSize';
$strQueryName = 'qryAddProductSize';
$strFormName = 'frmEnterProductSize';

     if ((($_POST[intProductSizeID])||($_GET[intProductSizeID])) && (!$_POST[$strReprocessing])) {
             include (MODULE . "/action/qrySelectProductSize");
             //echo $strSQL;
             if($_POST[intProductSizeID]){
             	$_POST[intProductSizeID] = $_GET[intProductSizeID];
             }
             $strTitle = "Update";
             $strButtonTitle = "update";
             $txtID = stripslashes($myrow["ID"]);
             $cboProduct = stripslashes($myrow["Product"]);
             $cboSize = stripslashes($myrow["Size"]);
         }else{
             $strTitle = "Enter";
             $strButtonTitle = "save";
             if($txtID){ $txtID = stripslashes(eregi_replace("\"", "&quot;", $_POST[txtID])); }
     }
     
if($strStyleSheet == TRUE){
	echo "<table class='Normal' border='0' align='left' width='450'>";
}
echo "
<tr>
     <td>
         <table  width='450' cellpadding='0' cellspacing='0' border='0' class='Normal' align='center'>
     <tr align='left'>
         <td align='left' colspan='2'>
             <H2>$strTitle Product Size</H2>
         </td>
     </tr>
";
// Upploaded = 0
echo (StartForm($strScreenName, "post", $strQueryName,array('intProductSizeID'=>$_POST[intProductSizeID],'strReprocessing'=>'True'),"","",$strFormName,"","return frmEnterProductSize_onsubmit()"));


echo "
     <tr align='left'>
         <td align='right'>
             <b>Product :</b>
         </td>
         <td align='left'>";
             CreateDropDown("cboProduct", "SELECT * FROM tblProduct ORDER BY 2", "", $cboProduct);
echo "
             <a href='".ScreenURL("EnterProduct")."' target='_blank'>+</a>
         </td>
     </tr>
";
//  Type                 3
//  atrributes           1
//  AllowZeroLength      False
//  Default Value        
//  Validate Rule        
//  Validate Text        Size
//  SourceField          Size
//  Required             True
echo "
     <tr align='left'>
         <td align='right'>
             <b>Size :</b>
         </td>
         <td align='left'>";
             CreateDropDown("cboSize", "SELECT * FROM tblSize ORDER BY 2", "", $cboSize);
echo "
             <a href='".ScreenURL("EnterSize")."' target='_blank'>+</a>
         </td>
     </tr>
";
echo "
     <tr>
         <td align='right' colspan='2'>
             <input type='image' src='./images/$strButtonTitle.gif' alt='$strButtonTitle'>
         </td>
     </tr>
         </table
     </form>
     </td>
 </tr>
";
	if($strStyleSheet == TRUE){
   		echo "</table>";
	}
     //$strListAll = "true";
       //include (MODULE . "/screen/ListProductSize");
?>
<script language="JavaScript">
<!--
function frmEnterProductSize_onsubmit() 
{


var ProductSelected = document.frmEnterProductSize.cboProduct.options[document.frmEnterProductSize.cboProduct.selectedIndex].value;
     if(ProductSelected) {
     }else{
         alert("Please enter Product");
         return(false);
     }

var SizeSelected = document.frmEnterProductSize.cboSize.options[document.frmEnterProductSize.cboSize.selectedIndex].value;
     if(SizeSelected) {
     }else{
         alert("Please enter Size");
         return(false);
     }


}
// -->
</script>
